import logging
import yagmail
def log_set():
     logging.basicConfig(level=logging.INFO,filename='log.txt',format=" %(message)s -> %(asctime)s ")
def sen_mail(filepath):
    mail=yagmail.SMTP(user='1105906242@qq.com',password='khkiysvitfdzjjjf',host="smtp.qq.com")
    mail.send(to='1105906242@qq.com',subject='测试报告',contents='内容',attachments=filepath)